package com.flyco.modules.oms.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.flyco.poi.excel.annotation.Excel;

/**
 * @Description: 发货单明细
 * @Author: flyco
 * @Date: 2023-08-09
 * @Version: V1.0
 */
@Data
@TableName("stm_jd_send_order_item")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "stm_jd_send_order_item对象", description = "发货单明细")
public class StmJdSendOrderItem {

    /**
     * 出库明细id
     */
    @Excel(name = "出库明细id", width = 15)
    @ApiModelProperty(value = "出库明细id")
    private String recId;
    /**
     * 出库编号
     */
    @Excel(name = "出库编号", width = 15)
    @ApiModelProperty(value = "出库编号")
    private String stockoutId;
    /**
     * 商品id
     */
    @Excel(name = "商品id", width = 15)
    @ApiModelProperty(value = "商品id")
    private String specId;
    /**
     * 商品编号（商家编码）
     */
    @Excel(name = "商品编号（商家编码）", width = 15)
    @ApiModelProperty(value = "商品编号（商家编码）")
    private String specNo;
    /**
     * 商品数量
     */
    @Excel(name = "商品数量", width = 15)
    @ApiModelProperty(value = "商品数量")
    private String goodsCount;
    /**
     * 商品总金额
     */
    @Excel(name = "商品总金额", width = 15)
    @ApiModelProperty(value = "商品总金额")
    private String totalAmount;
    /**
     * 已付
     */
    @Excel(name = "已付", width = 15)
    @ApiModelProperty(value = "已付")
    private String paid;
    /**
     * 销售价格
     */
    @Excel(name = "销售价格", width = 15)
    @ApiModelProperty(value = "销售价格")
    private String sellPrice;
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
    private String goodsName;
    /**
     * 商品编码
     */
    @Excel(name = "商品编码", width = 15)
    @ApiModelProperty(value = "商品编码")
    private String goodsNo;
    /**
     * 规格名称
     */
    @Excel(name = "规格名称", width = 15)
    @ApiModelProperty(value = "规格名称")
    private String specName;
    /**
     * 规格编码
     */
    @Excel(name = "规格编码", width = 15)
    @ApiModelProperty(value = "规格编码")
    private String specCode;
    /**
     * 货品成本价格
     */
    @Excel(name = "货品成本价格", width = 15)
    @ApiModelProperty(value = "货品成本价格")
    private String costPrice;
    /**
     * 重量
     */
    @Excel(name = "重量", width = 15)
    @ApiModelProperty(value = "重量")
    private String weight;
    /**
     * 商品编号
     */
    @Excel(name = "商品编号", width = 15)
    @ApiModelProperty(value = "商品编号")
    private String goodsId;
    /**
     * 平台id
     */
    @Excel(name = "平台id", width = 15)
    @ApiModelProperty(value = "平台id")
    private String platformId;
    /**
     * 退款状态:0无退款 1取消退款, 2已申请退款 3等待退货 4等待收货 5退款成功---(原始子订单关闭，这里也是退款状态)
     */
    @Excel(name = "退款状态:0无退款 1取消退款, 2已申请退款 3等待退货 4等待收货 5退款成功---(原始子订单关闭，这里也是退款状态)", width = 15)
    @ApiModelProperty(value = "退款状态:0无退款 1取消退款, 2已申请退款 3等待退货 4等待收货 5退款成功---(原始子订单关闭，这里也是退款状态)")
    private String refundStatus;
    /**
     * 市场价格
     */
    @Excel(name = "市场价格", width = 15)
    @ApiModelProperty(value = "市场价格")
    private String marketPrice;
    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private String discount;
    /**
     * 总货款/货品成交总价
     */
    @Excel(name = "总货款/货品成交总价", width = 15)
    @ApiModelProperty(value = "总货款/货品成交总价")
    private String shareAmount;
    /**
     * 税率
     */
    @Excel(name = "税率", width = 15)
    @ApiModelProperty(value = "税率")
    private String taxRate;
    /**
     * 条码
     */
    @Excel(name = "条码", width = 15)
    @ApiModelProperty(value = "条码")
    private String barcode;
    /**
     * 销售订单编号
     */
    @Excel(name = "销售订单编号", width = 15)
    @ApiModelProperty(value = "销售订单编号")
    private String saleOrderId;
    /**
     * 是否是赠品:0非赠品1自动赠送2手工赠送4周期购赠送8平台赠送
     */
    @Excel(name = "是否是赠品:0非赠品1自动赠送2手工赠送4周期购赠送8平台赠送", width = 15)
    @ApiModelProperty(value = "是否是赠品:0非赠品1自动赠送2手工赠送4周期购赠送8平台赠送")
    private String giftType;
    /**
     * 原始子订单号
     */
    @Excel(name = "原始子订单号", width = 15)
    @ApiModelProperty(value = "原始子订单号")
    private String srcOid;
    /**
     * 原始订单号
     */
    @Excel(name = "原始订单号", width = 15)
    @ApiModelProperty(value = "原始订单号")
    private String srcTid;
    /**
     * 订单内部来源:1手机2聚划算
     */
    @Excel(name = "订单内部来源:1手机2聚划算", width = 15)
    @ApiModelProperty(value = "订单内部来源:1手机2聚划算")
    private String fromMask;
    /**
     * 货品种类
     */
    @Excel(name = "货品种类", width = 15)
    @ApiModelProperty(value = "货品种类")
    private String goodsType;
    /**
     * 打印批次
     */
    @Excel(name = "打印批次", width = 15)
    @ApiModelProperty(value = "打印批次")
    private String batchNo;
    /**
     * 出库货位id
     */
    @Excel(name = "出库货位id", width = 15)
    @ApiModelProperty(value = "出库货位id")
    private String positionId;
    /**
     * 货位号
     */
    @Excel(name = "货位号", width = 15)
    @ApiModelProperty(value = "货位号")
    private String positionNo;
    /**
     * 当前货位出库总货品数量
     */
    @Excel(name = "当前货位出库总货品数量", width = 15)
    @ApiModelProperty(value = "当前货位出库总货品数量")
    private String positionGoodsCount;
    /**
     * need_sn=true时返回英文逗号分隔的sn
     */
    @Excel(name = "need_sn=true时返回英文逗号分隔的sn", width = 15)
    @ApiModelProperty(value = "need_sn=true时返回英文逗号分隔的sn")
    private String snList;

    //发货数量
    @TableField(exist = false)
    private Integer productCount;

    public Integer getProductCount() {
//		return Integer.valueOf(this.goodsCount);
        return Integer.valueOf((int) (Double.valueOf(this.goodsCount).longValue()));
    }
}
